﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Text;

namespace Snowing.Text
{
    public class TxtReader
    {
        private string path;
        public TxtReader(string path)
        {
            this.path = path;
        }

        public IList<string> ReadLines()
        {
            IList<string> result = new List<string>();
            StreamReader sr = new StreamReader(path);
            while (!sr.EndOfStream)
            {
                string line = sr.ReadLine();
                if (line != null && !string.IsNullOrWhiteSpace(line))
                {
                    result.Add(line.Trim());
                }
            }
            sr.Close();
            return result;
        }
    }
}